import * as constants from '../Constants'
import { 
  get, 
  GET_WORK_STATUS, 
  GET_SAMPLE_INFO, 
  GET_SAMPLE_IMGS,
  GET_CHECK_LIST,
  GET_SAMPLE_SCORE,
  GET_getHxjcfq,
  GET_ROLE_SCORE,
  GET_YYHXJX,
  GET_DICT_LIST,
  GET_PUSH_GOODS_DATA,
  GET_REASON_LIST
} from '../../service/api'
export interface RecordBand {
  type: constants.RecordBand,
  payload: {
    id: string
    no: string
  }
}
export interface RecordSample {
  type: constants.RecordSample
  payload: Promise<any>
}
export interface RecordSample_FULFILLED {
  type: constants.RecordSample_FULFILLED
  payload: any
}
export interface GetSampleImg {
  type: constants.GetSampleImg
  payload: Promise<any>
}
export interface GetSampleImg_FULFILLED {
  type: constants.GetSampleImg_FULFILLED
  payload: any
}
export interface GetWorkStatus {
  type: constants.GetWorkStatus
  payload: Promise<any>
}
export interface GetWorkStatus_FULFILLED {
  type: constants.GetWorkStatus_FULFILLED
  payload: any
}

export interface GetSampleScore {
  type: constants.GetSampleScore
  payload: Promise<any>
}
export interface GetSampleScore_FULFILLED {
  type: constants.GetSampleScore_FULFILLED
  payload: any
}

export interface GetHxjcfq {
  type: constants.GetHxjcfq
  payload: Promise<any>
}
export interface GetHxjcfq_FULFILLED {
  type: constants.GetHxjcfq_FULFILLED
  payload: any
}

export interface GetSampleChecked {
  type: constants.GetSampleChecked
  payload: Promise<any>
}
export interface GetSampleChecked_FULFILLED {
  type: constants.GetSampleChecked_FULFILLED
  payload: any
}

export interface GetReasonList {
  type: constants.GetReasonList
  payload: Promise<any>
}
export interface GetReasonList_FULFILLED {
  type: constants.GetReasonList_FULFILLED
  payload: any
}

export interface GetRoleScore {
  type: constants.GetRoleScore
  payload: Promise<any>
}
export interface GetRoleScore_FULFILLED {
  type: constants.GetRoleScore_FULFILLED
  payload: any
}

export interface GetYyHxJx {
  type: constants.GetYyHxJx
  payload: Promise<any>
}
export interface GetYyHxJx_FULFILLED {
  type: constants.GetYyHxJx_FULFILLED
  payload: any
}

export interface InitDictList {
  type: constants.InitDict
  payload: Promise<any>
}

export interface InitDictList_FULFILLED {
  type: constants.InitDict_FULFILLED
  payload: Array<any>
}

export interface InitPullData {
  type: constants.RECORD_Pull_Data
  payload: Promise<any>
}
export interface InitPullData_FULFILLED {
  type: constants.RECORD_Pull_Data_FULFILLED
  payload: any
}

export type GlobalAction = RecordBand |
  RecordSample |
  RecordSample_FULFILLED |
  GetSampleImg |
  GetSampleImg_FULFILLED |
  GetWorkStatus |
  GetWorkStatus_FULFILLED |
  GetYyHxJx |
  GetYyHxJx_FULFILLED |
  GetRoleScore |
  GetRoleScore_FULFILLED |
  GetSampleChecked |
  GetSampleChecked_FULFILLED |
  GetSampleScore |
  GetSampleScore_FULFILLED |
  GetHxjcfq |
  GetHxjcfq_FULFILLED |
  InitDictList |
  InitDictList_FULFILLED |
  InitPullData |
  InitPullData_FULFILLED |
  GetReasonList |
  GetReasonList_FULFILLED
//记录band信息
export function recordBand(band: any): RecordBand {
  return {
    type: constants.RecordBand,
    payload: band
  }
}
export function recordSample(param: any): RecordSample {
  return {
    type: constants.RecordSample,
    payload: get(GET_SAMPLE_INFO, param)
  }
}
export function getSampleImgs(param: any): GetSampleImg {
  return {
    type: constants.GetSampleImg,
    payload: get(GET_SAMPLE_IMGS, param)
  }
}
export function getWorkStatus(param: any): GetWorkStatus {
  return {
    type: constants.GetWorkStatus,
    payload: get(GET_WORK_STATUS, param)
  }
}

export function getSampleChecked(param: any): GetSampleChecked {
  return {
    type: constants.GetSampleChecked,
    payload: get(GET_CHECK_LIST, param)
  }
}

export function getReasonList(param: any): GetReasonList {
  return {
    type: constants.GetReasonList,
    payload: get(GET_REASON_LIST, param)
  }
}


export function getSampleScore(param: any): GetSampleScore {
  return {
    type: constants.GetSampleScore,
    payload: get(GET_SAMPLE_SCORE, param)
  }
}
export function getHxjcfq(param: any): GetHxjcfq {
  return {
    type: constants.GetHxjcfq,
    payload: get(GET_getHxjcfq, param)
  }
}

export function getRoleScore(param: any): GetRoleScore {
  return {
    type: constants.GetRoleScore,
    payload: get(GET_ROLE_SCORE, param)
  }
}

export function getYyHxJx(param: any): GetYyHxJx {
  return {
    type: constants.GetYyHxJx,
    payload: get(GET_YYHXJX, param)
  }
}
export function getDictList(param: any): InitDictList {
  return {
    type: constants.InitDict,
    payload: get(GET_DICT_LIST, param)
  }
}

export function getPullData(param: any): InitPullData {
  return {
    type: constants.RECORD_Pull_Data,
    payload: get(GET_PUSH_GOODS_DATA, param)
  }
}

export function getDataInfos(param: any): InitPullData {
  return {
    type: constants.RECORD_Pull_Data,
    payload: get(GET_PUSH_GOODS_DATA, param)
  }
}